Examples · Adjust layout at different viewport widths · Dark mode · Detecting orientation, hover and motion on a responsive card gallery · Target an ...
3 天前 · Media queries allow you to apply CSS styles depending on a device's media type (such as print vs. screen) or other features or characteristics. Media · Testing media queries · Width · Reduced motion
Media queries in CSS3 extended the CSS2 media types idea: Instead of looking for a type of device, they look at the capability of the device. Examples · Try it Yourself · W3Schools Tryit Editor